"""
用于断言，判断功能实现与否
"""
import time

from constants.constant_config import app, MAIN_WINDOW


def result(control_name, control_type, win_name=MAIN_WINDOW):
    time.sleep(1)
    return app.window(title=win_name).child_window(title=control_name, control_type=control_type).exists()
